fn main() {
    // let c1 = vec![2, 3, 5, 89, 100];
    // let mx = largest(&c1);
    // println!("{:?}", mx);

    let p1 = Point{
        x: 8,
        y: 6.2
    };
    println!("{:?}\tx:{}\ty:{}", p1, p1.x, p1.y);

    let p2 = Point{
        x: 5,
        y: 5,
    };
    println!("{:?}\tx:{}\ty:{}", p2, p2.x, p2.y);

    let p3 = Point{
        x: 5.2,
        y: 6
    };
    println!("{:?}\tx:{}\ty:{}", p3, p3.x, p3.y);

    let p4 = Point{
        x: 5.1,
        y: 5.2
    };
    println!("{:?}\tx:{}\ty:{}", p4, p4.x, p4.y);
}

// fn largest<T: std::cmp::PartialOrd>(m: &[T]) -> T {
//     let mut lgst = &m[0];
//     for &item in m.iter() {
//         if lgst < &item {
//             lgst = &item;
//         }
//     }
//     lgst
// }

#[derive(Debug)]
struct Point <T, E>{
    x: T,
    y: E,
}